Skip to content

Verify quota gate scope through signed lane references - #9101

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/context-scope-navigation-20261120
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/context-scope-navigation-20261120

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The public quota CLI can use the approved quota packet or an explicitly requested Complete Turn. The scoped-gate test now exercises both entry points on real File and SQLite authorities. Both views must preserve the designated gate when the Markdown display is current, empty or stale. Complete Turn is selected explicitly before its signed decision is validated.

The cases accept the complete gate reference when the packet points to the retained open items. They still verify the exact Todo, task class and gate scope, and confirm that the read leaves the display bytes intact.

Author Declaration

Written by model_agent (OpenAI Codex, GPT-6).

Implemented against

Criterion Disposition Evidence
Preserve canonical gate identity and scope on both public CLI views. Implemented 24 real File and SQLite cases combine ordinary and Complete Turn calls, two gate scopes, and three display states.
Validate the signed decision when Complete Turn is explicitly selected. Implemented Every Complete Turn case exercises the existing runtime owner. The ordinary cases validate the canonical gate under the public default offered by the tested source.
Preserve the supported release entry point through the same composition. Verified locally The release builder's committed-source default probe refuses current main and passes with #9084 in the tested composition. Explicit Codex App recovery and preparation pass separately on both local authorities. Public-default repair

Validation

Author-tested head ab192e099ec7326abc3058d9a6c0015b984f4e02 against 8e9a28a866da06cc6fd63e78709910fe35dad564 on main.

Check kind Result Evidence
real_entrypoint passed All 24 affected cases at the exact author head.
integration passed 52 quota selection tests and 8 standard premerge checks at the author head.
regression_parity passed The previous test raised “unsupported complete Turn decision version” for all 12 ordinary gate cases in the composed source with the supported public default. The updated test passes those 12 cases and adds 12 explicit signed cases.
integration passed 371 passed and 11 skipped on the repaired composition. The production composition also passed 25 standard premerge checks and nine TypeScript context cases.
static passed Ruff on the changed module. The local composition passed CI-scope Ruff, kernel mypy and the TypeScript type check.
integration not_run Full hosted CI, installed host adoption, and matched production cost qualification.

The local compatibility check integrates exact heads from #9084 (including #9082), #9078, #9086, #9005 and #9103 with current main and this test. The source tree is ee583ad6df9230615958e068c3bc59463eb6a810. The combined tests ran the release default probe and the native File/SQLite selection-to-readiness and historical receipt paths. The #9084 public-default change and its independent review are tracked in the existing PR.

Frontend / Visual Evidence

UI impact is none.

Type of Change

  • Test update

LoopX Area

  • Control plane

Both commits carry DCO sign-off. Independent review is pending.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

维护 quota CLI 的开发者要检查用户审批是否指向正确的 Agent 或 Goal。 旧测试直接索引门禁数组。当前 CLI 可以用同一份签名结果中的引用表示等价门禁,导致主干六项测试在核对门禁身份前报错。 新测试先验证完整签名结果,再检查相同的门禁 ID、作用域和显示文件。File 和 SQLite 都覆盖当前、空和陈旧显示。 此提交恢复现有集成测试,生产文件逐字节一致。

改动思路 / Approach

复用 TypeScript complete Turn consumer 验证原始载体。出现 gate_open_items_ref 时,测试要求它指向同一摘要里的 first_open_items。然后用 fixture 给定的 todo_gate、user_gate 和预期 scope 核对实际结果。继续支持 literal 分支,让两种公开表达都能检查同一个业务结果。完整载体约定

具体改动 / Changes

精确 head d26c1c80e6631a64e954a4dde43d1ee567a309ba,diff base 8e9a28a866da06cc6fd63e78709910fe35dad564。只改 tests/control_plane/test_quota_selection.py,新增 20 行、删除 4 行。原来 6 个 File 组合扩为 12 个 File/SQLite 组合。分别读回当前、空和陈旧 Markdown 情形,再核对展示文件字节保持原样。逐项复核 Explicit user gate scope 和 Complete signed Turn references。作用域约定 · 聚焦用例

对主干的风险 / Risks

主干六项在直接索引 gate_open_items 时同样报 KeyError。候选 40 项 quota selection、66 项 TypeScript、预合并 5 项直接检查和 3 项选中检查、变更 Ruff 均通过。TypeScript 拒绝错摘要、引用链和缺少 literal owner。双存储补充对照中,另一 Agent 有独立工作时继续执行,global gate 仍保持审批。

另一 Agent 空闲时,File 和 SQLite 的主干及候选都在当前门禁列表为空时返回 operator_gate_notify。 有工作时 A 正常执行。scope override 在找不到 selected_action 时提前返回;这是未改动的等待分支。现有分支

我的整体评价 / Verdict

同意此精确提交。它恢复了真实 CLI 在签名结果后的业务断言。两种存储共用一组已有测试,并沿用生产验证器,便于今后定位作用域与载体两种错误。空闲 lane 的既有通知另有生产分支可定位。

English verdict: APPROVE. The test restores independent scope checks behind the signed Turn on File and SQLite. The idle-lane notification predates this test change.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

维护多 Agent 配额入口的开发者,需要核对一项用户审批会挡住哪些工作。 主干六个用例因缺少直接门禁数组而在作用域断言前失败。新提交可从同一份决定读取门禁引用或直接数组。 我验证了两种存储上的门禁身份、作用域和只读性。把本提交的精确测试文件放到 #9084 候选源码下运行时,普通响应与显式 Complete Turn 的两种格式也都通过。 本次交付范围是配额 CLI 的测试覆盖。 #9084 的默认响应改动与实际安装采用仍由该提案及发布验收负责。

改动思路 / Approach

原用例仍从真实 File 或 SQLite 任务存储调用 quota should-run。它检查返回的门禁 ID、任务类别、明确的目标 Agent 或全局范围,并读回展示文件。显式 Complete Turn 先经过现有完整决定校验器。门禁返回引用时,测试要求它指向同一份决定中的开放任务列表。当前主干上的两种调用都输出 v1。单独用 #9084 候选的公开 CLI 复测,普通调用保留直接数组,显式调用保留 v1。

具体改动 / Changes

精确提交 ab192e0,基线 8e9a28a。一份配额测试文件新增 27 行、删除 6 行。自上一评审 d26c1c8 以来,这次把两种调用显式参数化,把完整决定断言放到显式调用中。上一份测试在 #9084 的普通 CLI 上 12 例均以 unsupported complete Turn decision version 失败。新测试在同一候选源上 24 例通过。 作用域约定 docs/project-agent-todo-contract.md · 精确测试 · 候选生产源码 #9084

  • 通道门禁。独立复验显示,B 等待审批时,A 可继续自己已经持有的 Todo。两种存储都核对了状态和门禁 ID。
  • 全局门禁。同一组调用可以阻挡 A 与 B。替换展示为无 Todo 的状态后,两个 provider 的权威记录和展示字节都保持一致。

对主干的风险 / Risks

主干 6 项旧断言因 KeyError 失败。精确头的配额与 Turn 测试共 98 项通过。TypeScript 完整决定测试 66 项通过,涵盖无法解析和来源含糊的引用。每个源码版本各跑 16 次双 Agent 独立调用,分别覆盖有独立工作和受全局门禁约束的路径。变更 Ruff 通过。

首次标准预合并的 quota-plan smoke 中,子命令退出 1。未确认首次失败原因。该 smoke 单独重跑通过,随后以相同选项串行对照,基线和精确头均通过 5 项直接及 3 项选中检查。托管 CI 和安装版实际采用仍待相应验证。

我的整体评价 / Verdict

同意这个测试提交。继续使用现有参数化用例即可证明两种公开格式的门禁含义,TypeScript 用例侧重引用约束,真实 CLI 用例侧重范围与存储读回。独立工作可继续的路径得到验证。该提交覆盖配额命令行测试,视觉核验范围为空。

English verdict: APPROVE. The exact-head test restores the real scoped-gate assertions and accepts both public response modes. The prior test failed every ordinary case on the separate #9084 source, while the new matrix and two-actor controls passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant